import request from "@/utils/http";

//轮播图广告区域
export const getBannersAPI = (distributionSite = 1) => {
  return request({
    url: "/home/banner",
    data: {
      distributionSite,
    },
  });
};

// 前台分类
export const getCategoryAPI = () => {
  return request({
    url: "/home/category/mutli",
  });
};

// 人气推荐
export const getHotsAPI = () => {
  return request({
    url: "/home/hot/mutli",
  });
};

// 新鲜好物
export const getNewGoodsAPI = (limit = 4) => {
  return request({
    url: "/home/new",
    params: { limit },
  });
};

// 猜你喜欢
export const getLikesAPI = (page = 1, pageSize = 10) => {
  return request({
    url: "/home/goods/guessLike",
    data: { page, pageSize },
  });
};
//推荐----请求数据-渲染界面
export const getRecomendsAPI = (
  url,
  subTypeId = "",
  page = 1,
  pageSize = 10
) => {
  return request({
    url,
    data: {
      subType: subTypeId,
      page,
      pageSize,
    },
  });
};